#include <stdio.h>
#include <math.h>

int main()
{
    int num;
    int ge;
    int shi;
    int bai;
    int sum;
    scanf("%d",&num);
    ge = num % 10;
    shi = num / 10 % 10;
    bai = num / 100;
    sum = pow(ge,3) + pow(shi,3) + pow(bai,3);
    if(num >= 100 && num <= 999){
        if(num == sum){
            printf("Yes\n");
        }else{
            printf("No\n");
        }
    }else{
        printf("Invalid Value.\n");
    }

    return 0;
}